package com.rc.evcharger.redis;


import com.rc.evcharger.common.annotation.Redis;
import com.rc.evcharger.common.annotation.RedisType;
import com.rc.evcharger.common.base.BaseRedis;

@Redis(table = "order")
public class RedOrder extends BaseRedis {
    @Redis(type = RedisType.KEY)
    private String rtua;
    @Redis(type = RedisType.KEY)
    private String gunNum;
    @Redis(type = RedisType.KEY)
    private String orderNum0;

    @Redis(type = RedisType.VALUE)
    String orderNum;

    public RedOrder() {
        super();
    }

    public RedOrder(String key, String orderNum) {
        //order:10 01 19 00 00 21:02:15361531833
        String[] keyAry = key.split(":");
        this.rtua = keyAry[1];
        this.gunNum = keyAry[2];
        this.orderNum0 = keyAry[3];
        this.orderNum = orderNum;
    }

    public RedOrder(String rtua) {
        super();
        this.rtua = rtua;
    }

    public RedOrder(String rtua, String gunNum, String orderNum0) {
        super();
        this.rtua = rtua;
        this.gunNum = gunNum;
        this.orderNum0 = orderNum0;
    }

    public RedOrder(String rtua, String gunNum, String orderNum0, String orderNum) {
        super();
        this.rtua = rtua;
        this.gunNum = gunNum;
        this.orderNum0 = orderNum0;
        this.orderNum = orderNum;
    }

    public String getRtua() {
        return rtua;
    }

    public void setRtua(String rtua) {
        this.rtua = rtua;
    }

    public String getGunNum() {
        return gunNum;
    }

    public void setGunNum(String gunNum) {
        this.gunNum = gunNum;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getOrderNum0() {
        return orderNum0;
    }

    public void setOrderNum0(String orderNum0) {
        this.orderNum0 = orderNum0;
    }

    public static void main(String[] args) {
        RedOrder redOrder = new RedOrder();
        System.out.println(redOrder.getKey());
    }
}
